<?php


namespace App\Http\Middleware;


use Closure;

class Cross
{
    public function handle($request, Closure $next)
    {
        $response = $next($request);
        $response->header("Access-Control-Allow-Origin", '*');
        $response->header("Access-Control-Allow-Credentials", 'true');
        $response->header("Access-Control-Allow-Methods", '*');
        $response->header("Access-Control-Allow-Headers", 'Origin, Content-Type, Cookie, X-CSRF-TOKEN, Accept, Authorization, X-XSRF-TOKEN');
        $response->header("Access-Control-Expose-Headers", '*');
        return $response;
    }
}
